<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        /*静态注册*/
        function onsubmitFunc() {
            console.log("静态注册");
            return false; // return false 可以阻止表单提交
        }

        /*动态注册*/
        window.onload = function () {
            var form2 = document.getElementById("form2");
            form2.onsubmit = function () {
                console.log("动态注册");
                return false;
            }
        }
    </script>
</head>
<body>
<form action="http://localhost:63342" method="get" onsubmit="return onsubmitFunc();">
    <table>
        <tr>
            <td><input type="submit" value="静态注册"></td>
        </tr>
    </table>
</form>
<form action="http://localhost:63342" method="get" id="form2">
    <table>
        <tr>
            <td><input type="submit" value="动态注册"></td>
        </tr>
    </table>
</form>
</body>
</html>